package com.example.entity;

/**
 * @author 胡帅博
 * @date 2020/9/29 15:02
 */
final public class CalRecipeArray{

   public CalRecipe[] calRecipes =null;

    // id根据是根据calRecipes计算得出的
    public int id = 0;

    // index是将 id映射到从零开始的连续空间后，得到的结果
    public int index;

    public CalRecipeArray(CalRecipe[] f) {
        this.calRecipes = f;
        id = ((((id | calRecipes[0].index) << 9) | calRecipes[1].index) << 9) | calRecipes[2].index;
    }


    public CalRecipeArray(CalRecipe[] f,int serrid) {
        this.calRecipes = f;
        id=serrid;
    }
}
